import request from '@/router/axios';
import {downloadExcel} from '@/router/axios';
import {formatCondition} from '@/util/util';

//模型任务项管理单条查询
export const queryBizModelTaskItem = (params) => {
  params.head.transCode = 'queryBizModelTaskItem';
  return request({
    url: '/biz/model/bizModelTaskItem/queryBizModelTaskItem',
    method: 'post',
    data: params
  })
}
//模型任务项管理多条列表查询，支持条件查询
export const queryBizModelTaskItemListPage = (params) => {
  params.head.transCode = 'queryBizModelTaskItemListPage';
  return request({
    url: '/biz/model/bizModelTaskItem/queryBizModelTaskItemListPage',
    method: 'post',
    data: params
  })
}
//模型任务项管理新增单条记录
export const saveBizModelTaskItem = (params) => {
  params.head.transCode = 'saveBizModelTaskItem';
  return request({
    url: '/biz/model/bizModelTaskItem/saveBizModelTaskItem',
    method: 'post',
    data: params
  })
}
//模型任务项管理新增多条记录
export const saveBizModelTaskItemList = (params) => {
  params.head.transCode = 'saveBizModelTaskItemList';
  return request({
    url: '/biz/model/bizModelTaskItem/saveBizModelTaskItemList',
    method: 'post',
    data: params
  })
}
//模型任务项管理新增或修改单条记录
export const saveOrUpdateBizModelTaskItem = (params) => {
  params.head.transCode = 'saveOrUpdateBizModelTaskItem';
  return request({
    url: '/biz/model/bizModelTaskItem/saveOrUpdateBizModelTaskItem',
    method: 'post',
    data: params
  })
}


//模型任务项管理新增或修改单条记录
export const saveOrUpdateBizModelTaskItemList = (params) => {
  params.head.transCode = 'saveOrUpdateBizModelTaskItemList';
  return request({
    url: '/biz/model/bizModelTaskItem/saveOrUpdateBizModelTaskItemList',
    method: 'post',
    data: params
  })
}

//模型任务项管理修改单条记录
export const updateBizModelTaskItem = (params) => {
  params.head.transCode = 'updateBizModelTaskItem';
  return request({
    url: '/biz/model/bizModelTaskItem/updateBizModelTaskItem',
    method: 'post',
    data: params
  })
}

//模型任务项管理删除单条记录
export const deleteBizModelTaskItem = (params) => {
  params.head.transCode = 'deleteBizModelTaskItem';
  return request({
    url: '/biz/model/bizModelTaskItem/deleteBizModelTaskItem',
    method: 'post',
    data: params
  })
}

//模型任务项管理删除多条记录
export const deleteBizModelTaskItemList = (params) => {
  params.head.transCode = 'deleteBizModelTaskItemList';
  return request({
    url: '/biz/model/bizModelTaskItem/deleteBizModelTaskItemList',
    method: 'post',
    data: params
  })
}
//模型任务项管理导出excel
export const exportBizModelTaskItemExcel = (params) => {
  downloadExcel({
    url: '/biz/model/bizModelTaskItem/excelDownload/exportBizModelTaskItemExcel',
    method: 'get',
    data: 
    {
      tenantId: params.head.tenantId,
      orders:'',
      condition: formatCondition(params.body.sqlCondition)
    }
  })
}
